home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 2: CDPD 1 / Almathera Ten on Ten - Disc 2: CDPD 1.iso / pd / 101-125 / 118 / hammmm / graph_support < prev    next >
Text File  |  1995-03-13  |  1KB  |  58 lines

  1. \ General support for graphics.
  2. \
  3. \ Biuld Forth words that call Amiga libraries.
  4. \ All addresses are passed as relative JForth addresses
  5. \ that are converted to absolute before being passed
  6. \ to the Amiga library.
  7. \
  8. \ Author: Phil Burk
  9. \ Copyright 1987
  10.  
  11. decimal
  12.  
  13. ANEW TASK-GRAPH_SUPPORT
  14.  
  15. : RASSIZE() ( height width -- size_in_bytes )
  16.     swap 15 + -3 ashift
  17.     $ FFFE and
  18.     *
  19. ;
  20.  
  21. : ALLOCRASTER() ( x y -- address )
  22.     call graphics_lib allocraster if>rel
  23. ;
  24.  
  25. : FREERASTER() ( address x y -- )
  26.     >r >r >abs r> r> call graphics_lib freeraster drop
  27. ;
  28.  
  29. : INITTMPRAS() ( tmpras buffer size -- tmpras )
  30.     >r >abs >r >abs r> r>
  31.     call graphics_lib inittmpras
  32.     if>rel
  33. ;
  34.  
  35. : INITVIEW() ( view -- )
  36.     >abs call graphics_lib initview drop
  37. ;
  38.  
  39. : INITVPORT() ( -- viewport )
  40.     >abs call graphics_lib initvport drop
  41. ;
  42.  
  43. : MAKEVPORT()  ( view viewport -- )
  44.     >abs >r >abs r>
  45.     call graphics_lib makevport drop
  46. ;
  47.  
  48. : MRGCOP()  ( view -- )
  49.     >abs
  50.     call graphics_lib mrgcop drop
  51. ;
  52.  
  53. : LOADVIEW()  ( view -- )
  54.     >abs
  55.     call graphics_lib loadview drop
  56. ;
  57.  
  58.